Optimal. Leaf size=288 \[ \frac {2 \left (161 a^2 A b+63 A b^3+15 a^3 B+145 a b^2 B\right ) \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{105 b d \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}-\frac {2 \left (a^2-b^2\right ) \left (56 a A b+15 a^2 B+25 b^2 B\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} F\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{105 b d \sqrt {a+b \cos (c+d x)}}+\frac {2 \left (56 a A b+15 a^2 B+25 b^2 B\right ) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{105 d}+\frac {2 (7 A b+5 a B) (a+b \cos (c+d x))^{3/2} \sin (c+d x)}{35 d}+\frac {2 B (a+b \cos (c+d x))^{5/2} \sin (c+d x)}{7 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.31, antiderivative size = 288, normalized size of antiderivative = 1.00, number of steps
used = 8, number of rules used = 6, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.240, Rules used = {2832, 2831,
2742, 2740, 2734, 2732} \begin {gather*} \frac {2 \left (15 a^2 B+56 a A b+25 b^2 B\right ) \sin (c+d x) \sqrt {a+b \cos (c+d x)}}{105 d}-\frac {2 \left (a^2-b^2\right ) \left (15 a^2 B+56 a A b+25 b^2 B\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} F\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{105 b d \sqrt {a+b \cos (c+d x)}}+\frac {2 \left (15 a^3 B+161 a^2 A b+145 a b^2 B+63 A b^3\right ) \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{105 b d \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}+\frac {2 (5 a B+7 A b) \sin (c+d x) (a+b \cos (c+d x))^{3/2}}{35 d}+\frac {2 B \sin (c+d x) (a+b \cos (c+d x))^{5/2}}{7 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2732
Rule 2734
Rule 2740
Rule 2742
Rule 2831
Rule 2832
Rubi steps
\begin {align*} \int (a+b \cos (c+d x))^{5/2} (A+B \cos (c+d x)) \, dx &=\frac {2 B (a+b \cos (c+d x))^{5/2} \sin (c+d x)}{7 d}+\frac {2}{7} \int (a+b \cos (c+d x))^{3/2} \left (\frac {1}{2} (7 a A+5 b B)+\frac {1}{2} (7 A b+5 a B) \cos (c+d x)\right ) \, dx\\ &=\frac {2 (7 A b+5 a B) (a+b \cos (c+d x))^{3/2} \sin (c+d x)}{35 d}+\frac {2 B (a+b \cos (c+d x))^{5/2} \sin (c+d x)}{7 d}+\frac {4}{35} \int \sqrt {a+b \cos (c+d x)} \left (\frac {1}{4} \left (35 a^2 A+21 A b^2+40 a b B\right )+\frac {1}{4} \left (56 a A b+15 a^2 B+25 b^2 B\right ) \cos (c+d x)\right ) \, dx\\ &=\frac {2 \left (56 a A b+15 a^2 B+25 b^2 B\right ) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{105 d}+\frac {2 (7 A b+5 a B) (a+b \cos (c+d x))^{3/2} \sin (c+d x)}{35 d}+\frac {2 B (a+b \cos (c+d x))^{5/2} \sin (c+d x)}{7 d}+\frac {8}{105} \int \frac {\frac {1}{8} \left (105 a^3 A+119 a A b^2+135 a^2 b B+25 b^3 B\right )+\frac {1}{8} \left (161 a^2 A b+63 A b^3+15 a^3 B+145 a b^2 B\right ) \cos (c+d x)}{\sqrt {a+b \cos (c+d x)}} \, dx\\ &=\frac {2 \left (56 a A b+15 a^2 B+25 b^2 B\right ) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{105 d}+\frac {2 (7 A b+5 a B) (a+b \cos (c+d x))^{3/2} \sin (c+d x)}{35 d}+\frac {2 B (a+b \cos (c+d x))^{5/2} \sin (c+d x)}{7 d}-\frac {\left (\left (a^2-b^2\right ) \left (56 a A b+15 a^2 B+25 b^2 B\right )\right ) \int \frac {1}{\sqrt {a+b \cos (c+d x)}} \, dx}{105 b}+\frac {\left (161 a^2 A b+63 A b^3+15 a^3 B+145 a b^2 B\right ) \int \sqrt {a+b \cos (c+d x)} \, dx}{105 b}\\ &=\frac {2 \left (56 a A b+15 a^2 B+25 b^2 B\right ) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{105 d}+\frac {2 (7 A b+5 a B) (a+b \cos (c+d x))^{3/2} \sin (c+d x)}{35 d}+\frac {2 B (a+b \cos (c+d x))^{5/2} \sin (c+d x)}{7 d}+\frac {\left (\left (161 a^2 A b+63 A b^3+15 a^3 B+145 a b^2 B\right ) \sqrt {a+b \cos (c+d x)}\right ) \int \sqrt {\frac {a}{a+b}+\frac {b \cos (c+d x)}{a+b}} \, dx}{105 b \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}-\frac {\left (\left (a^2-b^2\right ) \left (56 a A b+15 a^2 B+25 b^2 B\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}}\right ) \int \frac {1}{\sqrt {\frac {a}{a+b}+\frac {b \cos (c+d x)}{a+b}}} \, dx}{105 b \sqrt {a+b \cos (c+d x)}}\\ &=\frac {2 \left (161 a^2 A b+63 A b^3+15 a^3 B+145 a b^2 B\right ) \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{105 b d \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}-\frac {2 \left (a^2-b^2\right ) \left (56 a A b+15 a^2 B+25 b^2 B\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} F\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{105 b d \sqrt {a+b \cos (c+d x)}}+\frac {2 \left (56 a A b+15 a^2 B+25 b^2 B\right ) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{105 d}+\frac {2 (7 A b+5 a B) (a+b \cos (c+d x))^{3/2} \sin (c+d x)}{35 d}+\frac {2 B (a+b \cos (c+d x))^{5/2} \sin (c+d x)}{7 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.14, size = 254, normalized size = 0.88 \begin {gather*} \frac {2 b \left (105 a^3 A+119 a A b^2+135 a^2 b B+25 b^3 B\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} F\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )+2 \left (161 a^2 A b+63 A b^3+15 a^3 B+145 a b^2 B\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} \left ((a+b) E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )-a F\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )\right )+b (a+b \cos (c+d x)) \left (154 a A b+90 a^2 B+65 b^2 B+6 b (7 A b+15 a B) \cos (c+d x)+15 b^2 B \cos (2 (c+d x))\right ) \sin (c+d x)}{105 b d \sqrt {a+b \cos (c+d x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(1304\) vs.
\(2(322)=644\).
time = 0.38, size = 1305, normalized size = 4.53
method | result | size |
default | \(\text {Expression too large to display}\) | \(1305\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 0.15, size = 562, normalized size = 1.95 \begin {gather*} \frac {\sqrt {2} {\left (30 i \, B a^{4} + 7 i \, A a^{3} b - 115 i \, B a^{2} b^{2} - 231 i \, A a b^{3} - 75 i \, B b^{4}\right )} \sqrt {b} {\rm weierstrassPInverse}\left (\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )}}{3 \, b^{2}}, -\frac {8 \, {\left (8 \, a^{3} - 9 \, a b^{2}\right )}}{27 \, b^{3}}, \frac {3 \, b \cos \left (d x + c\right ) + 3 i \, b \sin \left (d x + c\right ) + 2 \, a}{3 \, b}\right ) + \sqrt {2} {\left (-30 i \, B a^{4} - 7 i \, A a^{3} b + 115 i \, B a^{2} b^{2} + 231 i \, A a b^{3} + 75 i \, B b^{4}\right )} \sqrt {b} {\rm weierstrassPInverse}\left (\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )}}{3 \, b^{2}}, -\frac {8 \, {\left (8 \, a^{3} - 9 \, a b^{2}\right )}}{27 \, b^{3}}, \frac {3 \, b \cos \left (d x + c\right ) - 3 i \, b \sin \left (d x + c\right ) + 2 \, a}{3 \, b}\right ) - 3 \, \sqrt {2} {\left (-15 i \, B a^{3} b - 161 i \, A a^{2} b^{2} - 145 i \, B a b^{3} - 63 i \, A b^{4}\right )} \sqrt {b} {\rm weierstrassZeta}\left (\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )}}{3 \, b^{2}}, -\frac {8 \, {\left (8 \, a^{3} - 9 \, a b^{2}\right )}}{27 \, b^{3}}, {\rm weierstrassPInverse}\left (\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )}}{3 \, b^{2}}, -\frac {8 \, {\left (8 \, a^{3} - 9 \, a b^{2}\right )}}{27 \, b^{3}}, \frac {3 \, b \cos \left (d x + c\right ) + 3 i \, b \sin \left (d x + c\right ) + 2 \, a}{3 \, b}\right )\right ) - 3 \, \sqrt {2} {\left (15 i \, B a^{3} b + 161 i \, A a^{2} b^{2} + 145 i \, B a b^{3} + 63 i \, A b^{4}\right )} \sqrt {b} {\rm weierstrassZeta}\left (\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )}}{3 \, b^{2}}, -\frac {8 \, {\left (8 \, a^{3} - 9 \, a b^{2}\right )}}{27 \, b^{3}}, {\rm weierstrassPInverse}\left (\frac {4 \, {\left (4 \, a^{2} - 3 \, b^{2}\right )}}{3 \, b^{2}}, -\frac {8 \, {\left (8 \, a^{3} - 9 \, a b^{2}\right )}}{27 \, b^{3}}, \frac {3 \, b \cos \left (d x + c\right ) - 3 i \, b \sin \left (d x + c\right ) + 2 \, a}{3 \, b}\right )\right ) + 6 \, {\left (15 \, B b^{4} \cos \left (d x + c\right )^{2} + 45 \, B a^{2} b^{2} + 77 \, A a b^{3} + 25 \, B b^{4} + 3 \, {\left (15 \, B a b^{3} + 7 \, A b^{4}\right )} \cos \left (d x + c\right )\right )} \sqrt {b \cos \left (d x + c\right ) + a} \sin \left (d x + c\right )}{315 \, b^{2} d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \left (A+B\,\cos \left (c+d\,x\right )\right )\,{\left (a+b\,\cos \left (c+d\,x\right )\right )}^{5/2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________